﻿
using System.Data;
namespace com.hyrentals.dbaccess
{
    public class DBParamNameConstant
    {
        public const int ZERO_SIZE = 0;
        public const int MAX_SIZE = -1;

        public const SqlDbType GUID_DB_TYPE = SqlDbType.Char;
        public const int GUID_SIZE = 32;

        public const SqlDbType IMAGE_ID_DB_TYPE = SqlDbType.Char;
        public const int IMAGE_ID_SIZE = 34;

        public const SqlDbType ENUM_DB_TYPE = SqlDbType.TinyInt;
        public const int ENUM_SIZE = ZERO_SIZE;

        #region common

        public const string START = "@start";
        public const SqlDbType START_DB_TYPE = SqlDbType.Int;
        public const int START_SIZE = ZERO_SIZE;

        public const string COUNT = "@count";
        public const SqlDbType COUNT_DB_TYPE = SqlDbType.Int;
        public const int COUNT_SIZE = ZERO_SIZE;

        #endregion

        #region user

        public const string USER_ID = "@user_id";
        public const SqlDbType USER_ID_DB_TYPE = GUID_DB_TYPE;
        public const int USER_ID_SIZE = GUID_SIZE;

        public const string USER_PASSWORD = "@password";
        public const SqlDbType USER_PASSWORD_DB_TYPE = SqlDbType.NVarChar;
        public const int USER_PASSWORD_SIZE = 50;

        public const string USER_FIRST_NAME = "@first_name";
        public const SqlDbType USER_FIRST_NAME_DB_TYPE = SqlDbType.NVarChar;
        public const int USER_FIRST_NAME_SIZE = 50;

        public const string USER_LAST_NAME = "@last_name";
        public const SqlDbType USER_LAST_NAME_DB_TYPE = SqlDbType.NVarChar;
        public const int USER_LAST_NAME_SIZE = 50;

        public const string USER_GENDER = "@gender";
        public const SqlDbType USER_GENDER_DB_TYPE = SqlDbType.TinyInt;
        public const int USER_GENDER_SIZE = ZERO_SIZE;

        public const string USER_EMAIL = "@email";
        public const SqlDbType USER_EMAIL_DB_TYPE = SqlDbType.NVarChar;
        public const int USER_EMAIL_SIZE = 100;

        public const string USER_EMAIL_STATUS = "@email_status";
        public const SqlDbType USER_EMAIL_STATUS_DB_TYPE = SqlDbType.TinyInt;
        public const int USER_EMAIL_STATUS_SIZE = ZERO_SIZE;

        public const string USER_ACOUNT_STATUS = "@account_status";
        public const SqlDbType USER_ACOUNT_STATUS_DB_TYPE = SqlDbType.TinyInt;
        public const int USER_ACOUNT_STATUS_SIZE = ZERO_SIZE;

        public const string USER_REGISTRATION_DATE = "@registration_date";
        public const SqlDbType USER_REGISTRATION_DATE_DB_TYPE = SqlDbType.DateTime;
        public const int USER_REGISTRATION_DATE_SIZE = ZERO_SIZE;

        #endregion

        #region notice

        public const string NOTICE_SENDTO_ID = "@noticeSendToId";
        public const SqlDbType NOTICE_SENDTO_ID_DB_TYPE = SqlDbType.BigInt;
        public const int NOTICE_SENDTO_ID_SIZE = ZERO_SIZE;

        public const string NOTICE_SENDTO_IDS = "@noticeSendToIds";
        public const SqlDbType NOTICE_SENDTO_IDS_DB_TYPE = SqlDbType.VarChar;
        public const int NOTICE_SENDTO_IDS_SIZE = 512;

        public const string NOTICE_RECEIVER_ID = "@receiverId";
        public const SqlDbType NOTICE_RECEIVER_ID_DB_TYPE = GUID_DB_TYPE;
        public const int NOTICE_RECEIVER_ID_SIZE = GUID_SIZE;

        public const string NOTICE_RECEIVER_TYPE = "@receiverType";
        public const SqlDbType NOTICE_RECEIVER_TYPE_DB_TYPE = SqlDbType.TinyInt;
        public const int NOTICE_RECEIVER_TYPE_SIZE = ZERO_SIZE;

        public const string NOTICE_RECEIVE_STATUS = "@receiveStatus";
        public const SqlDbType NOTICE_RECEIVE_STATUS_DB_TYPE = SqlDbType.TinyInt;
        public const int NOTICE_RECEIVE_STATUS_SIZE = ZERO_SIZE;

        public const string NOTICE_RECEIVER_REGISTER_TIME = "@receiverRegisterTime";
        public const SqlDbType NOTICE_RECEIVER_REGISTER_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int NOTICE_RECEIVER_REGISTER_TIME_SIZE = ZERO_SIZE;

        public const string NOTICE_ID = "@noticeId";
        public const SqlDbType NOTICE_ID_DB_TYPE = SqlDbType.BigInt;
        public const int NOTICE_ID_SIZE = ZERO_SIZE;

        public const string NOTICE_SENDER_ID = "@senderId";
        public const SqlDbType NOTICE_SENDER_ID_DB_TYPE = GUID_DB_TYPE;
        public const int NOTICE_SENDER_ID_SIZE = GUID_SIZE;

        public const string NOTICE_SENDER_TYPE = "@senderType";
        public const SqlDbType NOTICE_SENDER_TYPE_DB_TYPE = SqlDbType.TinyInt;
        public const int NOTICE_SENDER_TYPE_SIZE = ZERO_SIZE;

        public const string NOTICE_RECEIVERS = "@receivers";
        public const SqlDbType NOTICE_RECEIVERS_DB_TYPE = SqlDbType.VarChar;
        public const int NOTICE_RECEIVERS_SIZE = 512;

        public const string NOTICE_SUBJECT = "@subject";
        public const SqlDbType NOTICE_SUBJECT_DB_TYPE = SqlDbType.NVarChar;
        public const int NOTICE_SUBJECT_SIZE = 256;

        public const string NOTICE_MESSAGE = "@message";
        public const SqlDbType NOTICE_MESSAGE_DB_TYPE = SqlDbType.NVarChar;
        public const int NOTICE_MESSAGE_SIZE = 2048;

        public const string NOTICE_SEND_STATUS = "@sendStatus";
        public const SqlDbType NOTICE_SEND_STATUS_DB_TYPE = SqlDbType.TinyInt;
        public const int NOTICE_SEND_STATUS_SIZE = ZERO_SIZE;

        public const string NOTICE_TYPE = "@type";
        public const SqlDbType NOTICE_TYPE_DB_TYPE = SqlDbType.TinyInt;
        public const int NOTICE_TYPE_SIZE = ZERO_SIZE;

        public const string NOTICE_SEND_TIME = "@sendTime";
        public const SqlDbType NOTICE_SEND_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int NOTICE_SEND_TIME_SIZE = ZERO_SIZE;

        public const string NOTICE_POST_TIME = "@postTime";
        public const SqlDbType NOTICE_POST_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int NOTICE_POST_TIME_SIZE = ZERO_SIZE;

        public const string NOTICE_EXPIRE_TIME = "@expireTime";
        public const SqlDbType NOTICE_EXPIRE_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int NOTICE_EXPIRE_TIME_SIZE = ZERO_SIZE;

        #endregion

        #region RV

        public const string RV_ID = "@RV_id";
        public const SqlDbType RV_ID_DB_TYPE = GUID_DB_TYPE;
        public const int RV_ID_SIZE = GUID_SIZE;

        public const string RV_OWNER_ID = "@owner_id";
        public const SqlDbType RV_OWNER_ID_DB_TYPE = GUID_DB_TYPE;
        public const int RV_OWNER_ID_SIZE = GUID_SIZE;

        public const string RV_TITLE = "@title";
        public const SqlDbType RV_TITLE_DB_TYPE = SqlDbType.NVarChar;
        public const int RV_TITLE_SIZE = 200;

        public const string RV_SUMMARY = "@summary";
        public const SqlDbType RV_SUMMARY_DB_TYPE = SqlDbType.NVarChar;
        public const int RV_SUMMARY_SIZE = 500;

        public const string RV_TYPE = "@type";
        public const SqlDbType RV_TYPE_DB_TYPE = SqlDbType.TinyInt;
        public const int RV_TYPE_SIZE = ZERO_SIZE;
        
        public const string RV_MODEL_STYLE = "@model_style";
        public const SqlDbType RV_MODEL_STYLE_DB_TYPE = SqlDbType.NVarChar;
        public const int RV_MODEL_STYLE_SIZE = 100;

        public const string RV_MADE_YEAR = "@made_year";
        public const SqlDbType RV_MADE_YEAR_DB_TYPE = SqlDbType.DateTime;
        public const int RV_MADE_YEAR_SIZE = ZERO_SIZE;

        public const string RV_MADE_BY = "@made_by";
        public const SqlDbType RV_MADE_BY_DB_TYPE = SqlDbType.TinyInt;
        public const int RV_MADE_BY_SIZE = ZERO_SIZE;

        public const string RV_MADE = "@made";
        public const SqlDbType RV_MADE_DB_TYPE = SqlDbType.NVarChar;
        public const int RV_MADE_SIZE = 100;

        public const string RV_SLEEPS = "@sleeps";
        public const SqlDbType RV_SLEEPS_DB_TYPE = SqlDbType.TinyInt;
        public const int RV_SLEEPS_SIZE = ZERO_SIZE;

        public const string RV_LENGTH = "@length";
        public const SqlDbType RV_LENGTH_DB_TYPE = SqlDbType.Float;
        public const int RV_LENGTH_SIZE = ZERO_SIZE;

        public const string RV_ZIP = "@zip";
        public const SqlDbType RV_ZIP_DB_TYPE = SqlDbType.VarChar;
        public const int RV_ZIP_SIZE = 6;

        public const string RV_STATE_ID = "@state_id";
        public const SqlDbType RV_STATE_ID_DB_TYPE = SqlDbType.Int;
        public const int RV_STATE_ID_SIZE = ZERO_SIZE;

        public const string RV_CITY_ID = "@city_id";
        public const SqlDbType RV_CITY_ID_DB_TYPE = SqlDbType.Int;
        public const int RV_CITY_ID_SIZE = ZERO_SIZE;

        public const string RV_ADDRESS = "@address";
        public const SqlDbType RV_ADDRESS_DB_TYPE = SqlDbType.NVarChar;
        public const int RV_ADDRESS_SIZE = 500;

        public const string RV_AVAILABLE_TYPE = "@available_type";
        public const SqlDbType RV_AVAILABLE_TYPE_DB_TYPE = SqlDbType.TinyInt;
        public const int RV_AVAILABLE_TYPE_SIZE = ZERO_SIZE;

        public const string RV_AVAILABLE_DATE_INTERVALS_JSON = "@available_date_intervals_json";
        public const SqlDbType RV_AVAILABLE_DATE_INTERVALS_JSON_DB_TYPE = SqlDbType.VarChar;
        public const int RV_AVAILABLE_DATE_INTERVALS_JSON_SIZE = MAX_SIZE;

        public const string RV_COVER_PHOTO_ID = "@cover_photo_id";
        public const SqlDbType RV_COVER_PHOTO_ID_DB_TYPE = IMAGE_ID_DB_TYPE;
        public const int RV_COVER_PHOTO_ID_SIZE = IMAGE_ID_SIZE;

        public const string RV_PRICING_JSON = "@pricing_json";
        public const SqlDbType RV_PRICING_JSON_DB_TYPE = SqlDbType.VarChar;
        public const int RV_PRICING_JSON_SIZE = MAX_SIZE;

        public const string RV_AUTOMOTIVE_JSON = "@automotive_json";
        public const SqlDbType RV_AUTOMOTIVE_JSON_DB_TYPE = SqlDbType.NVarChar;
        public const int RV_AUTOMOTIVE_JSON_SIZE = MAX_SIZE;
        
        public const string RV_INTERIORS_JSON = "@interiors_json";
        public const SqlDbType RV_INTERIORS_JSON_DB_TYPE = SqlDbType.NVarChar;
        public const int RV_INTERIORS_JSON_SIZE = MAX_SIZE;

        public const string RV_IS_ALLOWED_HANDLE_BOOKING = "@is_allowed_handle_booking";
        public const SqlDbType RV_IS_ALLOWED_HANDLE_BOOKING_DB_TYPE = SqlDbType.Bit;
        public const int RV_IS_ALLOWED_HANDLE_BOOKING_SIZE = ZERO_SIZE;
        
        public const string RV_STATUS = "@status";
        public const SqlDbType RV_STATUS_DB_TYPE = SqlDbType.TinyInt;
        public const int RV_STATUS_SIZE = ZERO_SIZE;

        public const string RV_CREATE_TIME = "@create_time";
        public const SqlDbType RV_CREATE_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int RV_CREATE_TIME_SIZE = ZERO_SIZE;

        #endregion

        #region photo

        public const string PHOTO_ID = "@photo_id";
        public const SqlDbType PHOTO_ID_DB_TYPE = IMAGE_ID_DB_TYPE;
        public const int PHOTO_ID_SIZE = IMAGE_ID_SIZE;

        public const string PHOTO_RV_ID = "@RV_id";
        public const SqlDbType PHOTO_RV_ID_DB_TYPE = GUID_DB_TYPE;
        public const int PHOTO_RV_ID_SIZE = GUID_SIZE;

        public const string PHOTO_DESCRIPTION = "@description";
        public const SqlDbType PHOTO_DESCRIPTION_DB_TYPE = SqlDbType.NVarChar;
        public const int PHOTO_DESCRIPTION_SIZE = 200;

        public const string PHOTO_CREATE_TIME = "@create_time";
        public const SqlDbType PHOTO_CREATE_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int PHOTO_CREATE_TIME_SIZE = ZERO_SIZE;
        
        #endregion

        #region rental request

        public const string RENTAL_REQUEST_ID = "@rr_id";
        public const SqlDbType RENTAL_REQUEST_ID_DB_TYPE = GUID_DB_TYPE;
        public const int RENTAL_REQUEST_ID_SIZE = GUID_SIZE;

        public const string RENTAL_REQUEST_RENTER_ID = "@renter_id";
        public const SqlDbType RENTAL_REQUEST_RENTER_ID_DB_TYPE = GUID_DB_TYPE;
        public const int RENTAL_REQUEST_RENTER_ID_SIZE = GUID_SIZE;

        public const string RENTAL_REQUEST_RV_ID = "@RV_id";
        public const SqlDbType RENTAL_REQUEST_RV_ID_DB_TYPE = GUID_DB_TYPE;
        public const int RENTAL_REQUEST_RV_ID_SIZE = GUID_SIZE;

        public const string RENTAL_REQUEST_STATE = "@state";
        public const SqlDbType RENTAL_REQUEST_STATE_DB_TYPE = ENUM_DB_TYPE;
        public const int RENTAL_REQUEST_STATE_SIZE = ENUM_SIZE;

        public const string RENTAL_REQUEST_OPEN_TIME = "@open_time";
        public const SqlDbType RENTAL_REQUEST_OPEN_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int RENTAL_REQUEST_OPEN_TIME_SIZE = ZERO_SIZE;

        public const string RENTAL_REQUEST_CLOSE_TIME = "@close_time";
        public const SqlDbType RENTAL_REQUEST_CLOSE_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int RENTAL_REQUEST_CLOSE_TIME_SIZE = ZERO_SIZE;

        public const string RENTAL_REQUEST_CHECKIN_TIME = "@checkin_time";
        public const SqlDbType RENTAL_REQUEST_CHECKIN_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int RENTAL_REQUEST_CHECKIN_TIME_SIZE = ZERO_SIZE;

        public const string RENTAL_REQUEST_CHECKOUT_TIME = "@checkout_time";
        public const SqlDbType RENTAL_REQUEST_CHECKOUT_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int RENTAL_REQUEST_CHECKOUT_TIME_SIZE = ZERO_SIZE;

        public const string RENTAL_REQUEST_PRICING_JSON = "@pricing_json";
        public const SqlDbType RENTAL_REQUEST_PRICING_JSON_DB_TYPE = SqlDbType.VarChar;
        public const int RENTAL_REQUEST_PRICING_JSON_SIZE = MAX_SIZE;

        public const string RENTAL_REQUEST_PAYMENT_DETAIL_JSON = "@payment_detail_json";
        public const SqlDbType RENTAL_REQUEST_PAYMENT_DETAIL_JSON_DB_TYPE = SqlDbType.VarChar;
        public const int RENTAL_REQUEST_PAYMENT_DETAIL_JSON_SIZE = MAX_SIZE;

        public const string RENTAL_REQUEST_HISTORY_JSON = "@history_json";
        public const SqlDbType RENTAL_REQUEST_HISTORY_JSON_DB_TYPE = SqlDbType.VarChar;
        public const int RENTAL_REQUEST_HISTORY_JSON_SIZE = MAX_SIZE;

        #endregion

        #region message

        public const string MESSAGE_ID = "@msg_id";
        public const SqlDbType MESSAGE_ID_DB_TYPE = GUID_DB_TYPE;
        public const int MESSAGE_ID_SIZE = GUID_SIZE;

        public const string MESSAGE_RELATED_TYPE = "@related_type";
        public const SqlDbType MESSAGE_RELATED_TYPE_DB_TYPE = ENUM_DB_TYPE;
        public const int MESSAGE_RELATED_TYPE_SIZE = ENUM_SIZE;

        public const string MESSAGE_RELATED_ID = "@related_id";
        public const SqlDbType MESSAGE_RELATED_ID_DB_TYPE = GUID_DB_TYPE;
        public const int MESSAGE_RELATED_ID_SIZE = GUID_SIZE;

        public const string MESSAGE_SENDER_ID = "@sender_id";
        public const SqlDbType MESSAGE_SENDER_ID_DB_TYPE = GUID_DB_TYPE;
        public const int MESSAGE_SENDER_ID_SIZE = GUID_SIZE;

        public const string MESSAGE_RECEIVER_ID = "@receiver_id";
        public const SqlDbType MESSAGE_RECEIVER_ID_DB_TYPE = GUID_DB_TYPE;
        public const int MESSAGE_RECEIVER_ID_SIZE = GUID_SIZE;

        public const string MESSAGE_CONTENT = "@content";
        public const SqlDbType MESSAGE_CONTENT_DB_TYPE = SqlDbType.NVarChar;
        public const int MESSAGE_CONTENT_SIZE = MAX_SIZE;

        public const string MESSAGE_SENDER_TIME = "@send_time";
        public const SqlDbType MESSAGE_SENDER_TIME_DB_TYPE = SqlDbType.DateTime;
        public const int MESSAGE_SENDER_TIME_SIZE = ZERO_SIZE;

        public const string MESSAGE_STATUS = "@status";
        public const SqlDbType MESSAGE_STATUS_DB_TYPE = ENUM_DB_TYPE;
        public const int MESSAGE_STATUS_SIZE = ENUM_SIZE;

        #endregion

    }

    public class DBColumnNameConstant
    {
        #region common

        #endregion

        #region user

        public const string USER_ID = "user_id";
        public const string USER_PASSWORD = "password";
        public const string USER_FIRST_NAME = "first_name";
        public const string USER_LAST_NAME = "last_name";
        public const string USER_GENDER = "gender";
        public const string USER_EMAIL = "email";
        public const string USER_EMAIL_STATUS = "email_status";
        public const string USER_PHONE_NUMBER = "phone_number";
        public const string USER_PHONE_STATUS = "phone_status";
        public const string USER_ACCOUNT_STATUS = "account_status";

        public const string USER_PASSWORD_RESET_GUID = "password_reset_guid";
        public const string USER_PASSWORD_RESET_GUID_EXPIREDATE = "password_reset_guid_expiredate";
        public const string USER_REGISTRATION_DATE = "registration_date";
        public const string USER_RESIDENCE_ID = "residence_id";
        public const string USER_BIRTH_DATE = "birth_date";

        #endregion

        #region notice

        public const string NOTICE_SENDTO_ID = "NoticeSendToId";

        public const string NOTICE_RECEIVER_ID = "ReceiverId";
        public const string NOTICE_RECEIVER_TYPE = "ReceiverType";
        public const string NOTICE_RECEIVE_STATUS = "ReceiveStatus";

        public const string NOTICE_ID = "NoticeId";
        public const string NOTICE_SENDER_ID = "SenderId";
        public const string NOTICE_SENDER_TYPE = "SenderType";
        public const string NOTICE_RECEIVERS = "Receivers";
        public const string NOTICE_SUBJECT = "Subject";
        public const string NOTICE_MESSAGE = "Message";
        public const string NOTICE_SEND_STATUS = "SendStatus";

        public const string NOTICE_TYPE = "Type";
        public const string NOTICE_SEND_TIME = "SendTime";
        public const string NOTICE_POST_TIME = "PostTime";
        public const string NOTICE_EXPIRE_TIME = "ExpireTime";

        #endregion

        #region RV

        public const string RV_ID = "RV_id";
        public const string RV_OWNER_ID = "owner_id";
        public const string RV_TITLE = "title";
        public const string RV_SUMMARY = "summary";
        public const string RV_TYPE = "type";
        public const string RV_MODEL_STYLE = "model_style";
        public const string RV_MADE_YEAR = "made_year";
        public const string RV_MADE_BY = "made_by";
        public const string RV_MADE = "made";
        public const string RV_SLEEPS = "sleeps";
        public const string RV_LENGTH = "length";
        public const string RV_ZIP = "zip";
        public const string RV_STATE_ID = "state_id";
        public const string RV_CITY_ID = "city_id";
        public const string RV_ADDRESS = "address";
        public const string RV_AVAILABLE_TYPE = "available_type";
        public const string RV_AVAILABLE_DATE_INTERVALS_JSON = "available_date_intervals_json";
        public const string RV_COVER_PHOTO_ID = "cover_photo_id";

        public const string RV_PRICING_JSON = "pricing_json";

        public const string RV_AUTOMOTIVE_JSON = "automotive_json";
        public const string RV_INTERIORS_JSON = "interiors_json";

        public const string RV_IS_ALLOWED_HANDLE_BOOKING = "is_allowed_handle_booking";
        public const string RV_STATUS = "status";
        public const string RV_CREATE_TIME = "create_time";

        #endregion

        #region photo

        public const string PHOTO_ID = "photo_id";
        public const string PHOTO_RV_ID = "RV_id";
        public const string PHOTO_DESCRIPTION = "description";
        public const string PHOTO_CREATE_TIME = "create_time";

        #endregion

        #region rental request

        public const string RENTAL_REQUEST_ID = "rr_id";
        public const string RENTAL_REQUEST_RENTER_ID = "renter_id";
        public const string RENTAL_REQUEST_RV_ID = "RV_id";
        public const string RENTAL_REQUEST_STATE = "state";
        public const string RENTAL_REQUEST_OPEN_TIME = "open_time";
        public const string RENTAL_REQUEST_CLOSE_TIME = "close_time";
        public const string RENTAL_REQUEST_CHECKIN_TIME = "checkin_time";
        public const string RENTAL_REQUEST_CHECKOUT_TIME = "checkout_time";
        public const string RENTAL_REQUEST_PRICING_JSON = "pricing_json";
        public const string RENTAL_REQUEST_PAYMENT_DETAIL_JSON = "payment_detail_json";
        public const string RENTAL_REQUEST_HISTORY_JSON = "history_json";

        #endregion

        #region message

        public const string MESSAGE_ID = "msg_id";
        public const string MESSAGE_RELATED_TYPE = "related_type";
        public const string MESSAGE_RELATED_ID = "related_id";
        public const string MESSAGE_SENDER_ID = "sender_id";
        public const string MESSAGE_RECEIVER_ID = "receiver_id";
        public const string MESSAGE_CONTENT = "content";
        public const string MESSAGE_SENDER_TIME = "send_time";
        public const string MESSAGE_STATUS = "status";

        #endregion
    }
}
